<?php
namespace app\common\validate;

use think\Validate;

class Address extends Validate
{
    protected $rule = [
        'linkman'  =>  'require',
        'mobile' =>  ['require','regex' => '/^1[3|4|5|7|8][0-9]\d{4,8}$/i'],
        'address' => 'require',
    ];

    protected $message = [
        'linkman.require' => '收货人姓名不能为空',
        'mobile.require' => '手机号码不能为空',
        'mobile.regex' => '手机号码格式错误',
        'address.require' => '详细地址不能为空',
    ];

}